package com.hjx.movie.common.utils;

/**
 * <p>Title:</p>
 * <p>Description:</p>
 *
 * @author hjx
 * @date 2020/12/30 - 16:48
 */
public enum ResultType {
    SUCCESS(true,2000,"success"),
    TOKEN_ERROR(false,5000,"传入的Token信息异常"),
    USER_INPUT_ERROR(false,4000,"用户输入异常"),
    SYSTEM_ERROR (false,6000,"系统服务异常"),
    OTHER_ERROR(false,9999,"其他未知异常");

    private ResultType(boolean result,int code,String message){
        this.result = result;
        this.code = code;
        this.message = message;
    }

    private final boolean result;
    private final int code;
    private final String message;

    public boolean isResult() {
        return result;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
